export class TopicMessage {
    userId: string;
    content: string;
    time: string;
    type: string;

    constructor(tm: any) {
        this.userId = tm.USER_ID;
        this.content = tm.CONTENT;
        this.time = tm.TIME;
        this.type = tm.TYPE;
    }

    isImage(): boolean {
        return this.type === "image";
    }

    isMessage(): boolean {
        return this.type !== "message"
    }
}